package com.zhijian.wharf.util;

import java.util.Objects;
import java.util.StringJoiner;

/**
 * @author HCG
 * @version 1.0
 * @date 2022/2/10
 */
public class StrUtil {

    public static String join(CharSequence delimiter,
                              Iterable<? extends Number> elements) {
        Objects.requireNonNull(delimiter);
        Objects.requireNonNull(elements);
        StringJoiner joiner = new StringJoiner(delimiter);
        for (Number cs : elements) {
            joiner.add(cs + "");
        }
        return joiner.toString();
    }
}
